home *** CD-ROM | disk | FTP | other *** search
/ Sacred & Secular / Sacred and Secular.iso / pc / movies / shared.dir / 05028_Script_5028 < prev    next >
Text File  |  1996-04-03  |  29KB  |  885 lines

  1. -- the following cast members must be in the specific cast number
  2. --        300 - 599  will have the pictures
  3. --       1300 - 1599  will have the text names associated with the pictures
  4. --       1199 - 1215 CAST MEMBERS RESERVED FOR SOUNDBITES
  5.  
  6. global gSndList
  7.  
  8. global zoomin,zoomout,zoommask,rplane,lplane,rplanemask,lplanemask
  9. global hand,handmask
  10. global NH,NV
  11. global firstpan,firstsnd
  12. global currentcast,firstincr,endincr
  13. global spritevis,popuptoggle,zoom1,zoom2,zoom,inlist
  14. global wherefrom,onPics,visicon,timeicon,globeicon,icon
  15. global soundcastno,picloclist2,comingfrom,ghostrollno
  16. global vispiclist,grow,gindex,narron,musicon
  17. global timepiclist1,timepiclist2,timepiclist3,timepiclist4
  18. global guidelist1,guidelist2,guidelist3,guidelist4,guidelist5
  19. global geoorder,visorder,timeorder,sndfilename,sndfileno
  20. global gskip,frame,frame2
  21. global sndbitelist,soundpathnarr,soundpathbed,soundpathmix,soundpath
  22. global firstdoublezoom,zoomcast
  23. global meanderlist
  24. global GlossUKAlfred,GlossMexico,GlossGreece,GlossEgypt,GlossPeru,GlossUS
  25. global openmovie,guidelist,glossplaceholder,datafirstline
  26. global findlist,music2on,soundpathessay
  27.  
  28.  
  29. global gTimeIndex
  30.  
  31. on oldStartMovieCode
  32.   cursor 4
  33.   startTimer
  34.   --put ">>> 1" && (the timer / 60.0)
  35.   unload
  36.   set music2on = 1
  37.   set datafirstline = 1
  38.   set meanderlist = []
  39.   set guidelist = []
  40.   set glossplaceholder = 2421 -- the number of cast "placeholder"
  41.   -- set guidemenu = the number of cast "GUIDED.PIC"
  42.   set rplane = 5001 -- the number of cast "cursor.right"
  43.   set rplanemask = 5002 -- the number of cast "mcursor.right"
  44.   set lplane = 5003 -- the number of cast "cursor.left"
  45.   set lplanemask = 5004 -- the number of cast "mcursor.left"
  46.   set zoomin = 5005 -- the number of cast "Zoom+"
  47.   set zoomout = 5006 -- the number of cast "Zoom-"
  48.   set zoommask = 5007 -- the number of cast "mZoom+"
  49.   set hand = 5008 -- the number of cast "hand"
  50.   set handmask = 5009 -- the number of cast "mhand"
  51.   
  52.   set openmovie = 9 -- the number of cast "animated opener"
  53.   set timeline = 617 -- the number of cast "LINE.PIC"
  54.   set frame = 659 -- the number of cast "HI_RECT1.PIC"
  55.   set frame2 = 660 -- the number of cast "HI_RECT2.PIC"
  56.   set gskip = 0
  57.   set zoom = 0
  58.   set zoomcast = 0
  59.   
  60.   set zoom1 = 5010 -- the number of cast "zoom1.pic"
  61.   set zoom2 = 5011 -- the number of cast "zoom2.pic"
  62.   set firstdoublezoom = 27 -- the number of cast "First Double Zoom" -1
  63.   set comingfrom = 0
  64.   set currentcast = 300
  65.   set musicon = 1
  66.   set narron = 1
  67.   set sndfilename = ""
  68.   set sndfileno = 1000
  69.   set firstpan = 1
  70.   set firstsnd = 1
  71.   set endincr = 0
  72.   set firstincr = 0
  73.   set wherefrom = 0
  74.   repeat with i = 32 to 46
  75.     set the visible of sprite i to false
  76.   end repeat
  77.   set spritevis = 0
  78.   set ghostrollno = 0
  79.   set popuptoggle = 0
  80.   --put ">>> 2" && (the timer / 60.0)
  81.   set findlist = ["UStext1" ,"UStext2" ,"UStext3" ,"UStext4" ,"UStext5" ,"UStext6" ,¨
  82. "UStext7" ,"UStext8" ,"MexicoText1","MexicoText2" ,"MexicoText3" ,"MexicoText4" ,¨
  83.  "MexicoText5" ,"Perutext1" ,"Perutext2" ,"Perutext3" ,"Perutext4" ,¨
  84.  "Perutext5" ,"UKtext1" ,"UKtext2" ,"UKtext3" ,"Greecetext1" ,¨
  85.  "Greecetext2","Greecetext3","Greecetext4" ,"Egypttext1",¨
  86.  "Egypttext2" ,"Egypttext3" ,"Egypttext4" ,"Egypttext5" ,"Egypttext6" ,¨
  87.  "19text" ,"99text" ,"22text" ,"41text" ,"32text" ,"56text" ,"78text" ,¨
  88.  "11text" ,"61text" ,"33text" ,"87text" ,"79text" ,"5text" ,"84text" ,¨
  89. "0text" ,"81text" ,"75text" ,"52text" ,"1text"  ,"1texta" ,"95text"  ,¨
  90. "95textb" ,"80text" ,"21text" ,"2text" ,"69text" ,"64text" ,"40text" ,¨
  91.  "7text" ,"97text"  ,"70text" ,"85text" ,"86text" ,"42text" ,"93text",¨
  92.   "37text"  ,"37texta" ,"67text" ,"3text"  ,"74text"  ,"15text" ,"15textb" ,¨
  93. "60text" ,"60texta" ,"68text" ,"82text" ,"82texta" ,"91text" ,"91texta" ,¨
  94. "26text" ,"18text"  ,"18texta" ,"96text" ,"96texta" ,"46text" ,"20text" ,¨
  95.  "65text" ,"65texta"  ,"4text" ,"4texta" ,"73text" ,"16text" ,"90text" ,¨
  96. "54text" ,"43text"  ,"45text" ,"57text" ,"59text" ,"58text"  ,"9text" ,¨
  97.  "10text" ,"66text" ,"44text" ,"77text" ,"89text" ,"89texta" ,¨
  98.  "92text" ,"35text" ,"12text" ,"72text" ,"17text"  ,"76text" ,¨
  99. "51text" ,"94text" ,"38text" ,"47text" ,"8text" ,"63text" ,"88text" ,¨
  100.  "49text" ,"83text" ,"98text" ,"30text" ,"31text" ,"53text" ,"48text" ,¨
  101. "23text" ,"24text" ,"27text" ,"28text" ,"62text"  ,"25text" ,"50text",¨
  102.  "34text" ,"13text" ,"55text" ,"6text" ,"39text","29text",¨
  103.  "71text" ,"36text" ,"14text" ]
  104.   
  105.   -- map vispic sound bites to castmember linked sound files
  106.   -- 1199 castanets a.aif
  107.   -- 1200  perusolo8.aif
  108.   -- 1201  shakers.aif
  109.   -- 1202  britsolo2.aif
  110.   -- 1203  britsolo8.aif  
  111.   -- 1204  castanets b.aif
  112.   -- 1205  egyptsolo5.aif
  113.   -- 1206  egyptsolo6.aif
  114.   -- 1207  folksolo2.aif
  115.   -- 1208  folksolo3.aif
  116.   -- 1209  greeksolo3.aif
  117.   -- 1210  greeksolo4.aif
  118.   -- 1211  Maracas a.aif
  119.   -- 1212  nativeamersolo1.aif
  120.   -- 1213  nativeamersolo2.aif
  121.   -- 1214  perusolo9.aif
  122.   -- 1215  saxsolo
  123.   set gSndList=["CAST.AIF","PERU.AIF","SHAKERS.AIF","BRIT2.AIF","BRIT8.AIF","CASTB.AIF","EGYPT5.AIF","EGYPT6.AIF","FOLK2.AIF","FOLK3.AIF","GREEK3.AIF","GREEK4.AIF","MARACAS.AIF","NATIVE1.AIF","NATIVE2.AIF","PERU9.AIF","SAX5.AIF"]
  124.   
  125.   set sndbitelist = [0,1204,1200,1204,1205,1206,1199,1202,1214,¨
  126. 0,1199,1214,1200,1203,1213,1214,1212,1201,¨
  127. 1206,1214,1200,1205,1210,1204,1213,1215,1200,¨
  128. 1210,1200,1214,1213,1206,1209,1214,1200,1214,¨
  129. 1209,1205,1199,1200,1205,0,1215,1212,1200,¨
  130. 1199,1200,1204,1206,1210,0,1203,1213,1214,¨
  131. 1200,1201,1199,1200,1201,0,1215,1214,1209,¨
  132. 1214,1203,0,1206,1215,0,1207,1215,1208,¨
  133. 1202,1214,0,1212,1210,1215,1208,1207,1214,¨
  134. 1212,1203,1207,1201,1208,1209,1207,1208,1215,¨
  135. 1203,1200,1214,1212,1213,1214,1200,1214,1210,¨
  136. 1202,1203,1213,1203,1203,1200,1215,1209,1207]
  137.   
  138.   set vispiclist = [¨
  139. [000,320,344,396,379,300,377,314,337],¨
  140. [000,312,345,366,387,392,303,331,360],¨
  141. [301,316,358,367,369,389,304,334,397],¨
  142. [302,373,359,372,305,354,307,393,370],¨
  143. [321,352,318,382,343,000,355,309,342],¨
  144. [346,335,365,384,391,000,315,310,364],¨
  145. [340,380,357,311,378,000,328,348,368],¨
  146. [374,381,000,329,350,000,351,323,371],¨
  147. [376,385,000,341,388,306,338,330,325],¨
  148. [326,386,313,356,394,308,339,349,336],¨
  149. [375,390,319,332,399,324,362,353,347],¨
  150. [317,395,322,361,333,327,383,363,398]]
  151.   
  152.   set timepiclist1 = [22:356,91:399,191:387,320:379,419:381,827:375,2274:367,¨
  153.                2387:315,2609:391,2855:326,2933:318,3002:304,3109:373,3212:354,¨
  154.                3584:345,3653:366,3722:392,3882:317,3979:376,4060:368,4128:330,¨
  155.                4197:323,4264:325,4334:350,4403:339,4470:314]
  156.   
  157.   set timepiclist2 = [22:341,91:322,343:305,1319:352,1976:380,2074:369,2274:364,¨
  158.                2387:360,2481:368,2550:382,2933:346,3002:335,3109:372,3212:343,¨
  159.   3584:357,3653:344,3992:347,4060:388,4128:398,4197:348,4264:327,4333:334,¨
  160.                4403:306,4469:329]
  161.   
  162.   set timepiclist3 = [22:332,91:378,159:333,357:384,1406:301,1639:395,2042:302,2274:303,¨
  163. 2343:385,2412:393,2481:337,2550:307,2933:396,3002:365,3143:316,3212:390,¨
  164. 3445:389,3626:310,3695:359,3992:338,4060:363,4128:383,4197:353,¨
  165.                       4265:324,4333:328,4401:355,4469:336]
  166.   
  167.   set timepiclist4 = [22:319,91:361,159:311,357:300,2017:321,2274:340,2343:397,¨
  168. 2412:370,2481:386,2550:374,2619:342,3002:320,3109:312,3267:377,¨
  169. 3626:309,3695:358,3924:351,3992:394,4060:308,4128:349,4197:331,4266:303,¨
  170.                      4333:362,4401:313,4468:371]
  171.   
  172.   --  set timepiclist1 = [22:356,91:399,191:387,320:379,419:381,827:375,2274:367,¨
  173. --               2387:315,2609:391,2855:326,2933:396,3002:320,3109:312,3212:354,¨
  174. --               3583:345,3652:366,3721:392,3882:317,3979:376,4060:368,4128:388,¨
  175. --               4197:348,4265:323,4334:350,4402:329,4470:339]
  176.   --  
  177.   --  set timepiclist2 = [22:341,91:322,343:305,1319:352,1976:380,2074:369,2274:364,¨
  178. --               2387:360,2481:368,2550:382,2933:318,3002:365,3109:373,3212:343,¨
  179. --               3625:357,3694:344,3992:351,4060:363,4128:349,4196:353,4266:303,4335:325,¨
  180. --               4403:306,4470:314]
  181.   --  
  182.   --  set timepiclist3 = [22:332,91:378,159:333,357:384,1406:301,1639:395,2042:302,2274:303,¨
  183. --                      2343:385,2412:393,2481:337,2550:340,2933:346,3002:335,3143:316,3212:390,¨
  184. --                      3445:389,3595:310,3664:359,3992:394,4060:308,4128:383,4197:331,¨
  185. --                      4265:324,4333:362,4401:355,4469:336]
  186.   --  
  187.   --  set timepiclist4 = [22:319,91:361,159:311,357:301,2017:321,2274:340,2343:397,¨
  188. --                     2412:370,2481:386,2550:374,2619:342,3002:304,3109:372,3267:377,¨
  189. --                     3595:309,3664:358,3924:334,3992:338,4060:347,4128:398,4197:330,4264:327,¨
  190. --                     4333:328,4401:313,4468:371]
  191.   
  192.   
  193.   set guidelist2 = [398,309,336,380,323,304,346,358,348,316,328,363,368,367,352,315,314]
  194.   
  195.   --  set guidelist2 = [384,336,302,358,373,383,348,316,324,392,306,387,323,346,¨
  196. --349,389,328,320,379,339,367,352,338,369,371,321,398]
  197.   
  198.   
  199.   set guidelist1 = [361,337,393,364,385,374,386,397,370,340,307,342,303,366]
  200.   -- OLD           [361,364,340,307,397,370,385,386,342,393,337,374,366,303]
  201.   
  202.   set guidelist3 = [399,332,341,322,378,356,350,311,319]
  203.   -- OLD           [319,399,378,341,332,356,350,322,311]
  204.   
  205.   set guidelist4 = [381,300,305,329,379,312,320,396,365,354,373,382,392,371]
  206.   -- OLD           [379,300,305,373,382,392,312,320,396,365,371]
  207.   
  208.   set guidelist5 = [390,357,377,313,330,394,331,351]
  209.   -- OLD           [390,377,313,394,398,351,330]
  210.   
  211.   
  212.   set gTimeIndex = 0
  213.   
  214.   set timeorder =[¨
  215. 319,332,341,356,361,378,322,399,311,333,¨
  216. 387,379,305,384,300,381,375,352,301,395,¨
  217. 380,321,302,369,367,364,303,340,397,370,¨
  218. 386,374,342,307,337,393,385,360,315,368,¨
  219. 382,391,326,396,346,318,320,365,335,304,¨
  220. 312,372,373,316,390,343,354,377,389,345,¨
  221. 309,310,357,366,358,359,344,392,317,376,¨
  222. 351,394,338,347,308,363,388,368,349,383,¨
  223. 398,330,331,353,348,323,303,324,327,325,¨
  224. 362,328,334,350,313,355,306,339,371,336,¨
  225. 329,314]
  226.   
  227.   set geoorder = [¨
  228. 338,326,392,349,383,351,394,360,380,304,¨
  229. 371,323,330,331,372,356,355,339,309,310,¨
  230. 378,398,322,336,399,341,306,332,334,313,¨
  231. 350,318,312,346,396,320,389,365,354,373,¨
  232. 382,377,316,328,358,359,357,345,390,335,¨
  233. 361,337,342,374,307,340,385,303,366,393,¨
  234. 364,386,397,370,353,348,327,324,362,311,¨
  235. 325,319,344,315,314,317,387,395,381,375,¨
  236. 376,333,388,321,368,363,302,369,347,391,¨
  237. 308,300,384,379,305,343,352,329,367,301]
  238.   
  239.   
  240.   set visorder = [ ¨
  241. 301,302,321,346,320,312,316,373,352,335,¨
  242. 344,345,358,359,318,365,396,366,367,372,¨
  243. 382,384,379,387,369,305,343,391,300,392,¨
  244. 389,354,377,303,304,307,355,315,314,331,¨
  245. 334,393,309,310,337,360,397,370,342,364,¨
  246. 340,374,376,326,375,317,380,381,385,386,¨
  247. 390,395,357,313,319,322,311,329,341,356,¨
  248. 332,361,378,350,388,394,399,333,306,308,¨
  249. 324,327,328,351,338,339,362,383,348,323,¨
  250. 330,349,353,363,368,371,325,336,347,398]
  251.   
  252.   
  253.   --put ">>> 3" && (the timer / 60.0)
  254.   set grow = 0
  255.   set gindex = 0
  256.   set visicon = 5012 -- the number of cast "ICON_I.PIC"
  257.   set globeicon = 5014 -- the number of cast "ICON_W.PIC"
  258.   set timeicon = 5013 -- the number of cast "ICON_T.PIC"
  259.   set icon = globeicon
  260.   set the visible of sprite 27 to false
  261.   set the regpoint of cast timeline = point(0,0)
  262.   if the machinetype = 256 then
  263.     set soundpath = the PathName & "snd\"
  264.     set soundpathmix = the PathName &"snd\mix\"
  265.     set soundpathbed = the PathName &"snd\bed\"
  266.     set soundpathnarr = the PathName &"snd\narr\"
  267.     set soundpathessay = the Pathname &"snd\essay\"
  268.   else
  269.     set soundpath = the PathName &"snd:"
  270.     set soundpathmix = the PathName &"snd:mix:"
  271.     set soundpathbed = the PathName &"snd:bed:"
  272.     set soundpathnarr = the PathName &"snd:narr:"
  273.     set soundpathessay = the Pathname &"snd:essay:"
  274.   end if
  275.   --put ">>> 3.5" && (the timer / 60.0)
  276.   -- cast "ENTERTEXT"
  277.   set the text of field 4786 to "" 
  278.   
  279.   set the text of field 4787 to "" -- cast "DATA" to "" 
  280.   set the text of field 4788 to "" -- cast "DATA2" to "" 
  281.   --put ">>> 4" && (the timer / 60.0)
  282.   
  283.   initglossary
  284.   --put ">>> 5" && (the timer / 60.0)
  285.   
  286.   cursor -1  
  287. end oldStartMovieCode
  288.  
  289. on StopMovieNOTUSED_DMD
  290.   repeat with i = 1 to 48
  291.     set the visible of sprite i to true
  292.   end repeat
  293.   unload
  294. end StopMovie
  295.  
  296. on unloadmem x
  297.   set the preLoadEventAbort = 0
  298.   --set the purgePriority of cast 4863 = 0 -- the qt cast template
  299.   
  300.   --pauseQTsound
  301.   
  302.   --put ">>> before unLoadCast " & the freeBytes
  303.   
  304.   unLoadCast
  305.   
  306.   --  if voidP(x) then
  307.   --    unLoadCast
  308.   --    put ">>> after unLoadCast " & the freeBytes
  309.   --  else if x <> 0 then
  310.   --    unLoadCast x
  311.   --    put ">>> after unLoadCast" && x && the freeBytes
  312.   --  end if
  313.   
  314.   if the machineType <> 256 then MaxMem()
  315.   --put ">>> after MaxMem " & the freeBytes
  316.   
  317.   --unpauseQTsound
  318.   
  319.   --  unload
  320.   --  put ramNeeded(80,100) into cast "ram"
  321.   --  put the text of field "ram" "ram after unload"
  322.   --  
  323.   --  unloadcast
  324.   --  put ramNeeded(80,100) into cast "ram"
  325.   --  put the text of field "ram" "ram after unloadcast"
  326.   --  
  327.   --  set CurrPicName = the name of cast x
  328.   --  unloadcast CurrPicName
  329.   --  put ramNeeded(80,100) into cast  "ram"
  330.   --  put the text of field "ram" "ram after unloadcast picname"
  331.   --  
  332.   set the preLoadEventAbort = 0
  333.   
  334. end unloadmem
  335.  
  336.  
  337. on positionBigPic captureH,captureV 
  338.   
  339.   swapPic(99,3, label("PanPic"), captureH,captureV)
  340.   
  341. end
  342.  
  343. on specialPos captureH, captureV
  344.   set x = 3
  345.   set the visible of sprite 3 = 0
  346.   updateStage
  347.   
  348.   SET NEWWIDTH = THE WIDTH OF CAST X
  349.   SET NEWHEIGHT = THE HEIGHT OF CAST X
  350.   SET WRATIO = NEWWIDTH/640.000
  351.   SET HRATIO = NEWHEIGHT/480.000
  352.   
  353.   set NH = captureH * WRATIO
  354.   set NV = captureV * HRATIO 
  355.   
  356.   -- restrict picture boundaries not to show black space
  357.   SET WLIMIT = NEWWIDTH - 640
  358.   SET HLIMIT = NEWHEIGHT - 480
  359.   If NH > WLIMIT then set NH = WLIMIT
  360.   If NV > HLIMIT  then set NV = HLIMIT
  361.   
  362.   -- position the spot in the middle of the screen
  363.   set NH = -(NH) + 320
  364.   set NV = -(NV) + 240
  365.   if NH > 0 then set NH = 0
  366.   if NV > 0 then set NV = 0
  367.   
  368.   set the regpoint of cast x = point(0,0) 
  369.   
  370.   
  371.   --set the rect of sprite 3 = rect(0,0,NEWWIDTH,NEWHEIGHT)
  372.   --put ">>> sprite 3's rect = " & the rect of sprite 3 
  373.   set the locH of sprite 3 to NH
  374.   set the locV of sprite 3 to NV
  375.   set the visible of sprite 3 = 1  
  376. end
  377.  
  378.  
  379. on positionBigPicXX captureH,captureV 
  380.   set cn = the castNum of sprite 3
  381.   set the locH of sprite 7 to -640
  382.   
  383.   --puppetsprite 1,true
  384.   
  385.   pauseQTSound
  386.   
  387.   set movieName = "" & (currentcast mod 100)
  388.   if length(movieName) = 1 then set movieName = "0" & movieName
  389.   set movieName = movieName & ".DIR"
  390.   
  391.   go to frame 20 of movie movieName
  392.   
  393.   --dmd 4/3
  394.   puppetsprite 2,true
  395.   puppetsprite 3,true
  396.   --  set the trails of sprite 3 = 1
  397.   --  set the trails of sprite 2 = 1 
  398.   set the locV of sprite 3 = -1000
  399.   set the castnum of sprite 3 = 0
  400.   set the castnum of sprite 2 = 0
  401.   
  402.   
  403.   --dmd 4/3
  404.   --unLoadMem cn
  405.   
  406.   go "PanPic"
  407.   
  408.   --  SET X = CURRENTCAST + 200
  409.   SET X = 3
  410.   set the loaded of cast x = 1
  411.   SET NEWWIDTH = THE WIDTH OF CAST X
  412.   SET NEWHEIGHT = THE HEIGHT OF CAST X
  413.   SET WRATIO = NEWWIDTH/640.000
  414.   SET HRATIO = NEWHEIGHT/480.000
  415.   
  416.   set NH = captureH * WRATIO
  417.   set NV = captureV * HRATIO 
  418.   
  419.   -- restrict picture boundaries not to show black space
  420.   SET WLIMIT = NEWWIDTH - 640
  421.   SET HLIMIT = NEWHEIGHT - 480
  422.   If NH > WLIMIT then set NH = WLIMIT
  423.   If NV > HLIMIT  then set NV = HLIMIT
  424.   
  425.   -- position the spot in the middle of the screen
  426.   set NH = -(NH) + 320
  427.   set NV = -(NV) + 240
  428.   if NH > 0 then set NH = 0
  429.   if NV > 0 then set NV = 0
  430.   
  431.   -- dmd ALREADY SET ABOVE :-) set x = currentcast + 200
  432.   
  433.   set the regpoint of cast x = point(0,0) 
  434.   set the castnum of sprite 3 to x
  435.   --set the trails of sprite 3 = 0
  436.   --set the trails of sprite 2 = 0
  437.   
  438.   
  439.   set the rect of sprite 3 = rect(0,0,NEWWIDTH,NEWHEIGHT)
  440.   put ">>>" & the rect of sprite 3 
  441.   set the locH of sprite 3 to NH
  442.   set the locV of sprite 3 to NV
  443.   whichzoom
  444.   
  445.   updateStage
  446.   
  447.   unPauseQTSound
  448.   
  449.   --go "PanPic"
  450. end positionBigPic 
  451. on whichzoom
  452.   set doublezoom = [306,314,315,329,333,343,351,352,356,357,369,387,396,398]
  453.   -- put correct zoom pic
  454.   set inlist = getone(doublezoom,currentcast)
  455.   puppetSprite 4, 1
  456.   if inlist = 0 then
  457.     set the castnum of sprite 4 = zoom1 
  458.     set zoomno = zoom1
  459.     set zoom = 1
  460.   else
  461.     set the castnum of sprite 4 = zoom2
  462.     set zoomno = zoom2
  463.     set zoom = 2
  464.   end if
  465.   set zl = 622
  466.   if zoom = 1 then
  467.     set zt = 463
  468.   else
  469.     set zt = 437
  470.   end if
  471.   --put ">>>zoomno",zoomno
  472.   set zw = the width of cast zoomno
  473.   set zh = the height of cast zoomno
  474.   --put ">>>" & the height of cast zoomno "height"
  475.   set the rect of sprite 4 =  rect(zl,zt,zl+zw,zt+zh)
  476.   --put ">>>" & the locV of sprite 4 "sprite 4 V"
  477.   --put ">>>" & the locH of sprite 4 "sprite 4 H"
  478. end whichzoom
  479.  
  480. on godoublezoom
  481.   --  set x = currentcast + 200
  482.   --  set CurrPicName = the name of cast x
  483.   --unloadmem x
  484.   set cn = the castNum of sprite 3
  485.   set the puppet of sprite 3 = 1
  486.   set the castNum of sprite 3 = 0
  487.   
  488.   pauseQTSound
  489.   
  490.   unLoadMem cn
  491.   set zoomcast = 6 -- firstdoublezoom + inlist
  492.   set the castnum of sprite 3 to zoomcast
  493.   set the regpoint of cast zoomcast = point(0,0)
  494.   set the rect of sprite 3 =  rect(0,0,640,480)
  495.   puppetsprite 4,false
  496.   -- UNLOAD
  497.   go "doublezoom"
  498.   -- unloadcast CurrPicName
  499.   
  500.   unPauseQTSound  
  501. end godoublezoom
  502. on PanPic 
  503.   -- PANNING FUNCTION
  504.   -- move picture around based on where the user moves mouse
  505.   -- test conditions restrict picture from revealing black space
  506.   -- get size of picture and set boundaries
  507.   -- which include increment amount
  508.   --  set x = currentcast + 200
  509.   
  510.   cursor [5073,5074] -- the grabbing hand
  511.   
  512.   set x = 3
  513.   
  514.   set picwidthlimit = min(0, 640 - the width of cast x)
  515.   
  516.   -- if picwidthlimit < 0 then set  picwidthlimit = 640
  517.   
  518.   set picheightlimit = min(0, 480 - the height of cast x)
  519.   -- if picheightlimit < 0 then set picheightlimit = 480
  520.   
  521.   set oldH = the locH of the clickloc --ch
  522.   set oldV = the locV of the clickloc  --ch
  523.   
  524.   set moveH = the locH of sprite 3
  525.   set moveV = the locV of sprite 3
  526.   
  527.   -- capture the mouse and picture location 
  528.   -- before the move
  529.   --    set oldH = the mouseH
  530.   --    set oldV = the mouseV
  531.   
  532.   -- get the new horizontal location of the mouse
  533.   -- test for:  if mouse at left of screen,then keep moving picture left
  534.   --            if mouse at right of screen,then keep moving picture right
  535.   --            else  move picture the increment of the new mouse loc - old mouse loc       
  536.   
  537.   -- get the new vertical location of the mouse
  538.   -- test for:  if mouse at top of screen,then keep moving picture up
  539.   --            if mouse at bottom of screen,then keep moving picture down
  540.   --            else  move picture the increment of the new mouse loc - old mouse loc       
  541.   
  542.   -- get the new horizontal location of the picture
  543.   -- test for:  if picture will be too far left,than set left edge
  544.   --            if picture will be too far right,than set right edge
  545.   --            else  move picture the increment of the new picture location      
  546.   
  547.   -- get the new vertical location of the picture
  548.   -- test for:  if picture will be too far up,than set top edge
  549.   --            if picture will be too far down,than set right edge
  550.   --            else  move picture the increment of the new picture location      
  551.   
  552.   --
  553.   -- dmd
  554.   --
  555.   -- Streamline the code and note the additional updateStage before updating
  556.   -- the locH, so as to let QuickTime play...
  557.   --
  558.   
  559.   repeat while the mousedown
  560.     
  561.     set NewH = the mouseH
  562.     set temp = the locH of sprite 3
  563.     
  564.     if newH > 1 and newH < 638 then
  565.       updateStage
  566.       set the locH of sprite 3 = min(0, max(picWidthLimit, temp + NewH - oldH)) 
  567.       set oldH = NewH -- ch
  568.     else if newH <= 1 and (temp > picWidthLimit) then 
  569.       updateStage
  570.       set the locH of sprite 3 = max(picWidthLimit, (temp - 10))
  571.     else if newH >= 638 and (temp < 0) then
  572.       updateStage
  573.       set the locH of sprite 3 = min(0, temp + 10)   
  574.     end if
  575.     
  576.     set temp = the locV of sprite 3
  577.     set NewV = the mouseV
  578.     
  579.     if newV > 1 and newV < 478 then
  580.       set the locV of sprite 3 = min(0, max(picHeightLimit, temp + newV - oldV)) 
  581.       set oldV = NewV --ch
  582.     else if newV <= 1 and (temp > picHeightLimit) then
  583.       set the locV of sprite 3 = max(picHeightLimit, (temp - 10))
  584.     else if newV >= 478 and (the locV of sprite 3 < 0) then
  585.       set the locV of sprite 3 = min(0, temp + 10)
  586.     end if
  587.     
  588.     updatestage
  589.     
  590.   end repeat
  591.   
  592.   global hand,handmask
  593.   cursor [hand,handmask] 
  594. end PanPic
  595.  
  596. on SwapPic right,picsize, newLabel, h, v
  597.   global gTimeIndex
  598.   
  599.   cursor 4
  600.   
  601.   if right = 99 then
  602.     pauseQTSound
  603.   else
  604.     stopQTSound
  605.   end if
  606.   
  607.   --   unload everything possible,including the current pic being used 
  608.   --   before loading the next pic
  609.   --  if picsize = 1 then set x = currentcast 
  610.   --  if picsize = 2 then set x = currentcast + 100
  611.   --  if picsize = 3 then set x = currentcast + 200
  612.   
  613.   -- get next pic based on order
  614.   
  615.   if right <> 99 then
  616.     if icon = globeicon then getorder(right,geoorder)
  617.     else if icon = visicon then getorder(right,visorder)
  618.     else if icon = timeicon then getorder(right,timeorder, gTimeIndex)
  619.   end if
  620.   
  621.   set movieName = "" & (currentcast mod 100)
  622.   if length(movieName) = 1 then set movieName = "0" & movieName
  623.   set movieName = movieName & ".DIR"
  624.   
  625.   
  626.   if picsize = 1 then
  627.     set f = the frame - 1
  628.     
  629.     --put ">>> icon" && icon && icon - 5011
  630.     
  631.     go to frame (icon - 5011) of movie movieName
  632.     
  633.     puppetSprite 3, 1
  634.     puppetSprite 4, 1
  635.     puppetSprite 7, 1
  636.     
  637.     go to f
  638.     --    set x = currentcast
  639.     set x = 1
  640.     --    set phototext = currentcast + 1100
  641.     set phototext = 5
  642.     set the regpoint of cast phototext = point(0,0)
  643.     set cw = the width of cast phototext
  644.     set ch = the height of cast phototext
  645.     
  646.     set the foreColor of sprite 7 = 255
  647.     set the backColor of sprite 7 = 0
  648.     
  649.     set the castnum of sprite 7 = phototext
  650.     -- dmd set the rect of sprite 7 = rect(10,400,10+cw,400+ch)
  651.     set the rect of sprite 7 = rect(7,408,7+cw,408+ch)
  652.     Set the ink of sprite 7 to 0
  653.   else
  654.     if picsize = 2 then
  655.       set f = the frame - 1
  656.       
  657.       go to frame 20 of movie movieName
  658.       
  659.       puppetSprite 3, 1
  660.       puppetSprite 7, 1
  661.       
  662.       go to f
  663.       --      set x = currentcast + 100
  664.       set x = 2
  665.       set the castnum of sprite 7 = currentcast + 1100
  666.       set the locH of sprite 7 = -640
  667.     else
  668.       if right = 99 then
  669.         set f = newLabel
  670.       else
  671.         set f = the frame
  672.       end if
  673.       go to frame 20 of movie movieName
  674.       
  675.       puppetSprite 3, 1
  676.       puppetSprite 7, 1
  677.       
  678.       go to f
  679.       
  680.       --      set x = currentcast + 200
  681.       set x = 3
  682.       whichzoom
  683.     end if
  684.   end if
  685.   set the regpoint of cast x = point(0,0)
  686.   
  687.   set cn = the castNum of sprite 3
  688.   
  689.   unloadmem cn
  690.   
  691.   if picsize = 1 then
  692.     set the foreColor of sprite 3 = 255
  693.     set the type of sprite 3 = 1
  694.     
  695.     set the castnum of sprite 3 = x
  696.     set the locV of sprite 3 to 15
  697.     set the locH of sprite 3 to 24
  698.   else
  699.     set the type of sprite 3 = 1
  700.     
  701.     set the foreColor of sprite 3 = 255
  702.     set the castnum of sprite 3 = x
  703.     
  704.     if right = 99 then
  705.       specialPos h, v
  706.     else
  707.       set the locV of sprite 3 to 0
  708.       set the locH of sprite 3 to 0
  709.     end if
  710.   end if
  711.   --  unload
  712.   updatestage
  713.   
  714.   if right = 99 then
  715.     unPauseQTSound
  716.   else
  717.     playsndfile
  718.   end if
  719.   
  720.   cursor -1
  721. end SwapPic
  722.  
  723. on getorder right,whatlist, timeIndex
  724.   global gTimeIndex
  725.   
  726.   if voidP(timeIndex) then set timeIndex = 0
  727.   
  728.   set orderlist = whatlist
  729.   set endpic = count(orderlist)
  730.   
  731.   if timeIndex = 0 then
  732.     set whereinlist = getpos(orderlist,currentcast)
  733.   else
  734.     set whereInList = timeIndex
  735.   end if
  736.   
  737.   if right then
  738.     if whereinlist < endpic then
  739.       set gTimeIndex = whereInList + 1
  740.     else
  741.       set gTimeIndex =  1
  742.     end if
  743.     
  744.   else
  745.     if whereinlist > 1  then
  746.       set gTimeIndex = whereInList - 1
  747.     else
  748.       set gTimeIndex = endpic
  749.     end if
  750.     
  751.   end if
  752.   set currentcast = getat(orderlist,gTimeIndex)
  753.   
  754.   
  755. end getorder
  756.  
  757. on highlightbutton theV
  758.   -- highlights the button in the menu pop up when
  759.   -- the mouse is over the  button 
  760.   if rollover(32) then 
  761.     if theV < 313 then findbutton(33)
  762.     else  if theV < 334 then findbutton(34)
  763.     else if theV < 352  then findbutton(35)
  764.     else if theV < 370 then findbutton(36)
  765.     else if theV < 387  then findbutton(37)
  766.     else if theV < 412  then findbutton(38)
  767.     else findbutton(39)
  768.   end if
  769. end highlightbutton
  770.  
  771. on highlightbutton2 theV
  772.   -- on mousedown,go to the appropriate
  773.   -- menu
  774.   if theV < 313 then turnoffmenu("Approaches",1,0)
  775.   else if theV < 334 then turnoffmenu("global",1,0)
  776.   else if theV < 352  then turnoffmenu("timeline",1,0)
  777.   else if theV < 370 then turnoffmenu("visual1",1,0)
  778.   else if theV < 387  then turnoffmenu("guide",1,0)
  779.   else if theV < 412  then turnoffmenu("meander0",1,0)
  780.   else turnoffmenu("meet",1,0)
  781. end highlightbutton2
  782.  
  783. on findbutton newvis
  784.   set the visible of sprite spritevis to false
  785.   set spritevis to newvis
  786.   set the visible of sprite spritevis to true
  787.   go the frame
  788. end findbutton
  789.  
  790. on turnoffmenu branchto,gonow,countryscr
  791.   --set the visible of sprite 24 to false
  792.   set the visible of sprite 17 to false
  793.   if popuptoggle then
  794.     repeat with i = 32 to 46
  795.       set the visible of sprite i to false
  796.     end repeat
  797.     set popuptoggle = 0
  798.   end if
  799.   
  800.   --
  801.   --
  802.   -- If in Meet the Artist, then go back to the first frame to remove palette flash
  803.   --
  804.   if branchto <> 0 and marker(0) = Label("Meet") then go to marker(0) 
  805.   
  806.   if countryscr then
  807.     -- dmd    set the visible of sprite 16 to false
  808.     set the visible of sprite 17 to false
  809.     --    set the text of field "ENTERTEXT" to ""
  810.     --    set the text of cast "DATA" to ""
  811.     repeat with i = 4 to 8
  812.       set the visible of sprite i to false
  813.     end repeat
  814.     set the visible of sprite 22 to false
  815.   end if
  816.   if branchto = 0 then
  817.     nothing
  818.   else
  819.     branchtomenu (branchto,gonow,countryscr)
  820.   end if
  821.   --  cursor -1
  822. end turnoffmenu
  823. on  branchtomenu branchto,gonow,countryscr
  824.   stopQTSound
  825.   sound stop 1
  826.   set sndfileno = -1
  827.   repeat with i = 1 to 7
  828.     puppetsprite i,false
  829.   end repeat
  830.   cursor 4
  831.   updateStage
  832.   unloadmem
  833.   --cursor -1
  834.   -- new code
  835.   if not countryscr and not goNow and branchto <> 90 then
  836.     --
  837.     --
  838.     -- QA reported that blinking cursor for sprite 5 appears to blink
  839.     -- before the background art for the dialog box appears.  To fix
  840.     -- it, ensure that tbe basic dialog box art is there FIRST.
  841.     --
  842.     
  843.     set the visible of sprite 4 = 1 
  844.     updateStage
  845.     repeat with i = 5 to 8
  846.       set the visible of sprite i to true
  847.     end repeat
  848.     set the visible of sprite 22 to true
  849.   end if
  850.   
  851.   if gonow then
  852.     if branchto = 90 then GoCaptionPeru currentcast
  853.     else
  854.       if the movie = "BRIDGES.DIR" then
  855.         go branchto
  856.       else    
  857.         go branchto of movie "BRIDGES.DIR"
  858.       end if
  859.       
  860.     end if
  861.   else if branchto = 90 then GoCaptionPeru currentcast  
  862. end  branchtomenu
  863.  
  864. on   initglossary
  865.   set GlossUKalfred = 2403 --the number of cast "GlossUKalfred.PIC"  
  866.   --  1 GlosUKbarrow.PIC
  867.   --  2 GlosUKbritons.PIC
  868.   --  3 GlosUKcelts.PIC
  869.   --  4 GlosUKchalk.PIC
  870.   --  5 GlosUKdanes.PIC
  871.   --  6 GlosUKdruid.PIC
  872.   --  7 GlosUKequinox.PIC
  873.   --  8 GlosUKgrail.PIC
  874.   --  9 GlosUKhenge.PIC
  875.   --  10 GlosUKking.PIC
  876.   --  11 GlosUKley.PIC
  877.   --  12 GlosUKmegalith.PIC
  878.   --  13 GlosUKmerlin.PIC
  879.   --  14 GlosUKmound.PIC
  880.   set GlossMexico = 2502 -- the number of cast "GLOMEX01.PIC"
  881.   set GlossGreece = 2483 -- the number of cast "GLOGRE01.PIC"
  882.   set GlossEgypt = 2463 -- the number of cast "GLOEGY01.PIC"
  883.   set GlossPeru = 2431 -- the number of cast "GLOPER01.PIC"
  884.   set GlossUS = 2422 --the number of cast "GLOUSA01.PIC"
  885. end    initglossary